package FactoryPattern;

/**
 * @author liwuji
 * @date 2024/7/16
 * @desc 简单形状工厂模式
 **/
public class SimpleFactory {
    public Shape createShape(String shapeType){
        switch (shapeType){
            case "长方形": return new Rectangle();
            case "正方形":return new Rectangle();
            default:// 默认为圆行
               return new Rectangle();

        }
    }
}
